<table width="100%" border="0" cellpadding="0" cellspacing="0" background="/images/mainpage-sliced_16.jpg">
  <tr>
    <td width="20" height="40">&nbsp;</td>
    <td class="style5" style="border-right:solid 1px #FFFFFF;">Budget - Cost Report</td>
  </tr>
</table>
<table width="100%" border="0">
  <tr class="style2" align="center" background="/images/mainpage-sliced_11.jpg">
    <td><strong>Project Name</strong></td>
    <td><strong>Budget</strong></td>
    <td><strong>Cost</strong></td>
    <td><strong>Diff</strong></td>    
  </tr>
  <?php
  foreach ($projects as $i => $projectDetail): ?>
  <tr align="center" class="regulartext_<?php echo fmod($i, 2) ? 'even' : 'odd' ?>">
    <td style="text-decoration:underline"><a href="<?php echo url_for('project/show/'.$projectDetail['projectid'])?>"><?php echo $projectDetail['projectname'] ?></a></td>
    <td><?php echo number_format($projectDetail['budget']); ?></td>
    <td bgcolor=""><?php echo number_format($projectDetail['cost']); ?></td>
    <?php $diff = $projectDetail['budget'] - $projectDetail['cost'];?>
    <td <?php if ($diff<0){?>bgcolor="#CC99CC"<?php }?>><?php echo number_format($diff); ?></td>
  </tr>
  <?php endforeach; ?>  
</table>
<hr/>